more exception handling fix