Mailing templates fixes

Fix a bug in avatar creation
Adjustments in Home and avatar module