fix warning handling