Fixes #5
Fixed the error handling, As errors are now being "handled" need some additional testing to make sure there was no other bug