fix #2400, fix #2401