master.py: small fixes after refactoring