fix karma tests and jshint