Reordered statement to fix issue when running on test server.