several fix, add map