Fixed maximize bug