Removed unnecessary conditional checks on main.