fix bug on server registration