suggested fix for Issues #570 #589
Merge master