Fix lab 4

Gradients must be in order