Added attribute length reset code.