minor fixes on exceptions