fix #23 and #25