Fix flush on visibilitystatechange

Gosh I'm stupid.

Really need to do homework... But hey, now I have a 10-day
github streak... ;_;