fixed issue #1 #2