Fix condition to avoid warning