Fix the bug that is similar to that in commit: d74f01fd.
Fix the bug that is similar to that in commit: 51c3d2a3.