Fix a bug that occurs when multiple expectations are added