fixed bug causing incorrect number of arguments