fix filter check for commands