fixed Code Analysis issues