Bug fix undefined word, Bug fix semaphor reset.