Compare and main fix