Fixing bug 676
Merge pull request #677 from josenavas/issue-676

BUG: fixes #676