Fixed Stack Overflow Error