fixed small bug in base.js