removing whitespace in empty lines