Merge pull request #24 from dimagi/cz

fix mozilla bug 336551 further regression
small refactor