Fixed some bugs in independent.py