Feature/issue 22 23

Fixes for issues #22 #23