fixed precmd plugin method