avatar related bugs fixed