fixing propogation of errors