#95 Fix advanced filter functionality

Also resolved issue #92.