Add cast to avoid pointer cast warning C4133