fix npe on server