fixed issues #7 #9