misc clean up
python lib: minor fix