Bug fix

The versions were not processed before setting the headers which would
cause the first request to have faulty headers