Fixed Resharper warnings