Works on my machine. And not the server. Argh. Yet more logging. Using the correct variables this time.