Made --until work with motion detection