Fix multiple errors causing the app to halt

As per shortlog

Signed-off-by: James Lowe <james_gh@jlowe.demon.co.uk>
Merge pull request #3 from jegol/master

Fix multiple errors causing the app to halt