fix issues with list and map implementation