fixes based on jshint