Fixed broken filtering for third time.. and also other nice fixes