remove some redundant checks