Fixed ReSharper warnings