Bugfixes.

- Fixed #6649.
- Fixed #7330.