Fixed type mismatch in commit 410f573226. Added test case to ensure it works well. (cherry picked from commit a177d0282f)
410f573226
a177d0282f