fixed bug that caused thread starvation when only one sheet was compared.  added test