Fixed a bug where execution would continue even if an expect failed.