Fixing stupid logic