changing the order of loading in order to prevent referential integrity
problems