Fix selection bug in Firefox