bug fixes

fixes mderazon/csu-il#15
fixes mderazon/csu-il#17
Merge pull request #18 from mderazon/harpjs

bug fixes