fixed very stupid recusrion bug