fix #24 and #25