Ported to 1.2