fix #4, fix #5