fix #39, fix #41