fix #133 and #136