Fix translation problem due to object lifetime

Closed #27