Debug player cleanup to make it more robust