fix frame maximize bug