Fixed multiple window bug