fix #2344, #2340