may have fixed the gradient bug