fix to gradient