removing empty lines in mapdata string (fix for issue #1187)