Made recursive entry more robust and backwards compatible