Update lib/resize.js