Removing bad period