bugfix for gradient U