Fixed up filterCommand