Fixed up code per Kevin's request.