make timing of div removal more accurate