fix window locking