fixed parameter declaration in callback function cmd_func