For the decade that he had been behind bars, the prison inmate had no contact with his only daughter, a teenager. The divorcee in his 40s had been too ashamed to try to get in touch, as he felt he had let his family down.
With the encouragement of social workers, he started to write to her. Mr Fang Xin Wei, a senior social worker with the Singapore Children's Society, said that to the inmate's surprise, she replied and even visited him in jail.
Since 2014, the society has been running Project Relate in prison to help inmates bond with their families. Mr Fang said: "The dads miss their children and some don't get any visits from their families. They feel very helpless about this, but we tell them there is still one thing they can do - write to their family."
So once a week for four months, they are taught how to communicate with their loved ones, among other skills. Social workers also help the inmates' children and other family members to cope.
Other charities like Mendaki and the Salvation Army also run family bonding programmes inside the prison.
Ms Laura Lim, committee member of the Yellow Ribbon Fund, pointed out that children often suffer in silence, as some are ostracised in school.
She said: "The children may feel they are of less value as their fathers are in jail. So we have to tell them it doesn't mean you are a bad person even if your parent has done something wrong."
The fund pays for programmes to help inmates, ex-offenders and their families. Its Yellow Brick Road programme runs art therapy workshops for inmates' children to express themselves, besides giving them tuition and other activities.