Fixed record 'deleteAll' issue with undefined variable.