minor fixes for exceptions