made it work on both mozilla browsers and webkit ones