fixed typo causing stack overflow