fix xwared and clear warnings