Corrected a couple of brainfades..

and probably introduced a few more (but filtering seems to work now)