fix register bug when upload avatar