Fixed #2708.
Fixes #2689.
Fixed #2706.
Merge pull request #2713 from Spamcat/master

Small fixes