Fixed bug processing URL parameters

Very minor fix - obvious little code error.