do db updates in a different order to make things more robust. Does not work 100%