JS compatibility with Firefox improved