remove some redundant instructions