Fixed bug related to using 'name' instead of 'username'