Misc little fixes