Fixed session filter + added tests