fixed #56 and #57