fix #65 and #75