fixed bug in CompositeRestraint