Fixed subtle mistake that caused the gradient of V_q to be wrong for non-normalized quaternions.