do some fixes to comply with JSHint
do some fixes to comply with jshint