Better exception handling.