Fixed a bug that made the delete button sometimes delete multiple bars instead of one