Fix overlay bug