some fixes for maps and pasting