Getting rid of casting warning.