Made delection more db provider independent