Fixing bug with header transitions