fixed a bug in multilayernet which caused the conjugate gradient code not to work properly