Make order saving more robust