Fixing concurrency issue in removeAcknowledged.