Fix small bug in presence_based_delivery implementation