Fix derivative for error in output layer, WIP