some fixes in terms of map