Corrected the logic from previous checkin