fixed fatal bugs in fitpot.py.