Fixed required attribute bug.