fixed bug in BACE filter function