fix to avoid warnings after a check