add cast to avoid compiler warning