undefined username bug fixed #5