Fix Firefox-specific "undefined" bug