Attemps to fix race condtion
Merge changes