some minor fixes to types
merge with Krista's changes