Ash/13w42 fixes

HI ,

Please accept this Pull Request ,

this contains fixes for 

Issue #19  and Issue #22 

These issues are closed by these changes.