fix #58; fix #62; fix #68;