Fix for VTK 5.10.1

This seems to fix it for me. Can someone test it and merge it?
Thanks!