fix player logic