fix a bug in SPARQL function argument casting