fixes bug in shape models of smooth and gaussian cases