Added casting to ub_test checks