fix #25  #27 #19  #23 #28 #31  #32  #33 #34 #36 #37 #38 #35
Merge pull request #40 from lsentkiewicz/master

fix #25  #27 #19  #23 #28 #31  #32  #33 #34 #36 #37 #38 #35