fix for error with string function