Fix a bug in avatar path resolving