Fix for 0.6.5

This seems to have fixed it for me. This is my first pull request, so hopefully I'm doing it right!