Improvements on exceptions; better image resizement
Fix for images with same width and height