various fixes thanks to pylint