fixed server task to not terminate