Fix for bug #2. Not sure how this was not globalled!