more type-handling fixes.