Simplify the code

No functionality change intended.