few fixes here and there, check the diff
Merge pull request #1 from akhoury/master

few fixes here and there, check the diff