Hopefully this fixes issue #3. If not, I hope this works for everyone. It works for me.
It matches what is done in two other projects. Please test.