Fixes an li selection bug