Bugfixes.
Merge branch 'tmp'