Fixed too much recursion bug