various miscellaneous api-command fixes