changed conditions of if statements in fetchProfileInfo()