Removed a bug with multiple windows