Fix problem where only the last command in a list of commands was getting registered.