exception_test and fixes