fixed #19 #9 #4 #2