fixed lock contention problem in processing of resource markers. thanks for @davylandman