Handle loading of corrupt image

close #36
BP