some fixes on the backpropagation