Resize works badly, but works now