Fix all known bugs.

- Fixed Pear Bug	#19315 / Issue #1
- Fixed Pear Bug	#19176 / Issue #2