fix avatar problem and fix XXX bugs