fix map reinitialisation issue