Fixes issues where resize couldn't work with png