fix delete and omit function