Fixed error in shape generator.