bug fixes for initMode()

was missing a } on line 137