Added compatibility with Firefox