Fixed server closing