fixed an bug with saving avatars.

Signed-off-by: devxdev <xdev@devxdev.com>