fixed some gradient drawing issues