fix #56 and #57