Fixes #228

There was an issue with the order of events and it clashed with offline hiding / showing.