Updated to fix recurse problem