PMO-2838: fixed stackoverflow