Fix command type problem in search