Tweaked type conversion

Fixed erroneous type conversion for linear gradient