syntax fixing suggested by jshint