starting to fix race condition in stateful mapper
stateful mapper should be fixed now