fix #14 and #15