add on-delete and fix regression for nil and number comparison