Change some old style cast to new C++ style cast
Changed some old style casts to new C++ cast syntax