Fix some syntax and variable issues
Merge pull request #4 from AAudusseau/fix-issues

Fix #3. Fix some syntax and variable issues.