fixed issue #2 #3