Moved the conditional to a better spot