Fix gradient getting stuck on the previous color.