Handle empty line correctly