some generalization fixes