fixed maximize bug