Small fixes

A few fixes to some small issues I noticed while working with Pinta. Should be safe to merge before Pinta 1.5 without introducing any regressions.