Resolve #979 and color-gradient fix