fixed function parsing error