Implemented 'fix' for race condition.