Ported to 1.13d