Broken logic fix