Fixed #13711, #13528 -- Fixed problems in autogeneration and autotruncat...

...ion.
We are only repeating ourselves :)
Please re-read my last comment and feel free to ignore that opinion if you're not convinced.