Fixes map layer saving bug and validation on the map form.