Fix bugs
Merge pull request #15 from nlefler/bugfix

Fix bugs