fixed bug pointed out by Herb.