Fixed some issues in v2.2.4 release
fixed: #754 #763 #470 in #766 fixed: #776 in #777
Fix CommonJS build