remove some unnecessary commands