Fix #1602
Fix #1438
Merge pull request #1603 from Flakebi/fix

Fix #1438