Fix firefox/chrome performance issue"