modifications in commit a2cf11979 on master branch manually copied in places-dev branch