fixing command check