Fixed problem for optimise.py
Merge pull request #16 from dapopescu/master

Fixed problem for optimise.py