Correct runtime errors

Correct 'TypeError' bug when calling super() with python2
Don't fail on opening bad-typed images