fix bug with empty lines