Add a few more assertions and checks