fixed major bug with AtomicBoolean