fixed some lingering bugs with gradients
Merge branch 'master' into npRmpi