Fix small bugs on server