Slightly different but tidier resize logic

Please test it and let me know if your previous remark still holds.
Thank you