reset result to 0 after raising an error mesaage