fixed #67, #68 and #69