fixed segfaults on empty lines