I think this fixes #367