Fixing a silly gradient error