fix #35 and fix #36