Fixed small bug in main .js file