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

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