Fix resharper code issues