add explicit cast to avoid compiler warning