Fix bug when handling an empty line