fix map construction