fixed the error of sending an empty space after registration