Fixes to make chisubmit distributable