Fixes for atomics