fix the bug of checking empty line