correcting bugs in removing blank lines in dictionary