Condition and Calculation Not Working Together