Add test for cursor explain + a minor change