Fix bug when there are blank lines