Patch from Philip Carlsen for mkSave