[TIMOB-15494] Gradient bug fix

Fixes [TIMOB-15494](https://jira.appcelerator.org/browse/TIMOB-15494)