bug fix - thanks to eric