fix for gecko in js