Various little fixes