Fixed generation of id for player