fixed supervised mode JS bug