fix error when running on server