Fixed some bugs and jslint errors
1.4.3