Fixed problem with getWord being called twice