Row selection bug fix