Fixed bug which arose from primitive modification.