Add try except to is_admin check. Fix #645