Misc generalization fixes