Bugfixes.
Fix a crash.