Now works on ie as well, fixed a small issue