Fixed `getAndIncrement`-logic