Fix GH #17, fixes for 5.8.x/DOES.