another logic fix