Fixing bug with copying styles