Fix assert check