Moving sample window update to a hopefully better hackish place.