Fixed broken map implementation