Port to 0.8.5