fix #25
fix #26, fix #27