Minor exception handling fix