Fixed bug by ensuring that after a word is freed, it is set to NULL, from whence a check for nullity can be made