Fixed some bugs in manage.py