Fixing bug in safari