fix the bug for register activity with empty input