Fixing XC6 warnings