fix bug with formal parameters