Fix required attribute error