Fixed handling of 0-argument functions and commands with incorrect arguments