make saving work cross-platform