Better image resizing
Fix for duplicate xml header