Fix half-open cmd