Fixed R# code analysis warnings.