Committing Alan's fix for https://github.com/astorm/Pulsestorm/issues/22