Fix #1009 Attempting to delete activities reports 0 records found