few fixes to RELIC module