Filter Wizard: fixed a bug in cook_input