fix last failing test, fix map/sum to avoid nil error