Fixed show/hide bug while window locked