Changing the references from the database.