Fixed get_main_state main calendar instance check