Make the counter lock before reading/writing from the map
Simplified fetchers and also fixed accidental re-fetching of source images.