There seems to be a bug in $lactivewid.
When switching between channels it doesn't seem to register the last active window number.
In the code I added to my titlebar which shows the activewid/lactivewid it'll either return 'current/0' or 'current/'
Its hard to explain.