Fixed triggering API calls to not allow running the cmd twice