Fix program flush