Fixed <2.6 compliant exception handling