Disable window properly