tighten up exception handling.