fix exception
Merge pull request #1 from fmiguelmonteiro/exception

fix exception