Slight logic change