Fixed crash when removing status effects and improved stability.