fix #75 and change several stuff related to this issue