moved where ref_counter gets incremented, so it's only during the reference bit check now