some fixes to update/calculation order