Found bug in JS