Fix types to make dialyzer happy