small edit to exception handling