fixed issues in toArray, command and isArguments