Fixed bug with persisting order storing the wrong ID.