Improve handling of blank lines of input