Error in printing map