fix last resize bug