Merge pull request #1 from mattoufoutu/master

Various fixes from mattoufoutu