fixed #76, fixed #77, fixed #80