removed segfault
positive logic