Fix compile error caused by incompatible types.