Fixed error when wrong username is used