some fixes
Merge pull request #1 from campoy/master

a bunch of changes