Small fixes

A bit of small fixes here and there.
@odersky please have a look.