bugfix in writeELAsMip