Ported to 1.7.10
Ported to 1.7.10