Fix when $token is array in loadProfile