handle empty lines on the top of the document