fix a bug in back propagation