Assorted fixes