Fix cascade bugs and update tests