fix crash on keys with empty user id