Fix #199 fix possible race, while avoiding heavy weight synchronisation