bug fix - stack overflow. ouch