fixed error when no action is provided