fixed before/afterDelete handler, only delete meta-data record if base record has been deleted