Fixed atomic API, which used 'bool'

Also slight tweak to test cases to reduce false negatives.