fix for gradient drawing code, was starting from top instead of bottom