Fixed a bug that causes the instability