fixed issues reported by code analyzer