fix window state
fix state, new initialization, bitmaps