fix firefox performance issue