Fixed indri error, added persistence support