Upgrade to 3.40 part 1