fixing recursive issue