remove some logically dead code