Fixed bug in retrieval of email address for user