Fix for checking padding for non square images