more bug fixes; where did 'match' come from?