Fix refresh selection bug