added check for logical delete on index