Port changes from 2.1.6 to 2.1.8 to MC 1.7