Don't use displayName if it's empty (fixes #819), second try

This one has been tested. It seems to work perfectly, and shouldn't have any regressions. Simple one-liner.