Minor type fixes found by Dialyzer