Fix translate method

Fixes #212