Fix main logic