fixed synchronization bug in InMemoryBotContext