Port to 0.6. Close #471