Fix camelcase to underscore script bug