Fixes for internal objective gradient
Continued adventures in debugging