Fix system command blocking problem