fixing gradient