fix assert check