Potential fix for issue #256

This may be a naive fix, but it works for me. Hopefully this is helpful.