fix #176 fix #39