reference js bug