make it handle the no key case properly
made same improvement of message to leaflet (and fixed a bug)