Fixed jshint errors
Fixed inverted logic