Try to fix #665
But now it just crashes in a different way :/