Fixes some bugs detected after E1 final deliverable
Merge pull request #20 from griera/master

Fixes some bugs detected after E1 final deliverable