Fixed jslint error & small bug