Made an optional exit path and removed decrementing of reference counters