fixed bug in comparing Longs