fixed bug in gradSquaredError