Resolved small bug in exception handling.