Fixed a bug causing the application to crash when removing multiple items at once