fix code to make jshint happy