default name to username
Fixed tests and D1.7 compatible