Fix issues reported by QS tools