properly check if canEdit on map (fixes #217)