fix entity bug and add constant serverid