fixed client ending bug
merge