Changes to make it work with 0.5.2