Corrected logic error in getplayername