'Exceptional gain' from deal helps fintech company to turn profitable after several quarters