Code Analysis Fixes