Fixed issue: asking to detele when no records. Introduced hasRows reference.