More fixes for 5.8.x. GH #17