fix #72, fix #71, fix #60