Fixed exception in Firefox