fix player variable in js