tweaks to make this work in 0.13