fix issue #45 #39 #14