fixed command function call