various minor fixes
fix js print function