Error in joint index creation fixed.