Fixed not to repeat precmd and postcmd.