fix jslint and karma tests