issues with closing server