Small optimization change to deleteById method.