Fixing that weird resizing bug