Fixes for #4 and #5

Hey guys,

here is a pull request to fix the mentioned issues #4 and #5 

Cheers
Ronny