Ok i managed to fix it. Was some dumb declaration i made (for debugging perposes) in spawnPlayer() function. Now it displays correctly.