Horrible bug... but fix #822