Correction of some warnings

I am not used to contribute to big projects. So there might be some errors or wrong things, please check.