Port to 1.7 part 4