fix jshint errors
fix test to be compatible with API changed