Fix the assrtion check