Fix for crash in Firefox