Investigate why certain images crash the program

It could be due to the library, but who knows?!