Updated to work with 0.5.8