add explicit cast to support building inside eclipse