fixing #578 turned out to be easy