Fix typespecs spotted by dialyzer