Bugfixes.

- Fixed #6649.
- Fixed #7324.
- Fixed #7330.