fixed an issue with atomic increment/decrement