Some bugfixes in setup.py