Test modified according to modifications in gradients
Corrected end of SSP
Test modified according to modifications in gradients
Corrected gradient end