Revert unnecessary code change

#1008 has unnecessary code change. So I want to revert this code.