Fixed selector bug in Safari