Fixed recursive depth problem