fixed gradient bug