atomicity fixes