3.1 fix, taken from https://github.com/mmichelli/TranslatableDataObject/