Apply #9, should get the script working again

Fixes #16