fixing concurrent access bug, WIP