Added compatibility with FireFox