fix tests and jshint