fix #56 & fix #41 to allow images that are blatently too small