fixed error found by jshint