resize now works properly