removing atomicity violation