Fixed stupid bug in JS