Fixed a bug: the app would crash after finishing all the words