Minor logic fix