Fix map save bug (closes #698)