fixed parsing of function parameters