implement changes suggested by @sshyu wrt MapStory/mapstory/issues/577