fixed some errors serverside