Bugfixes.

- Fixed #4445.
- Fixed #4458.
- Small fixes.