gd() call fix

function calls cannot be passed by reference.
Since this is the only place it's a good compromise.