fix bug that allowed initChat to be executed multiple times