added prepareplayertospawn