fix errors from assert statements