Small fixes/2

Small things.
Please read each commit message for an explanation what it does.