sortWords method was incorrectly called inside the sortWord service thread and when starting the sortWord service thread. Should only be called in the service thread.