Added cast to clear compiler warning