added cast to remove warnings.