fixed gradient issues