Fixed issue where non-existent words were not handled properly