fixed rezizing problem