Fix some problemes revealed by jshint