Improve compatibility with Mozilla Firefox

Resolved #5