fix comments and exception types