Fix #418 in a slightly different way