fixed issue with oddly sized images