fix precmd method, typo