Fixed shape creation bug.