minor function and assert check additions