fixing minor bugs due to PEP8 style convention conversion