fix #69 and #72