Minor exception handling improvement