thanks for your feedback :D
about the bug that you found it's not a bug, the reason why that happens is that the red enemy dealt more damage than the other enemy and it's enough to trigger an upgrade and the red enemy dealt continuous damage so after you pick an upgrade it will hit you again and trigger another upgrade, and the reason why that always happens is that I forgot to add some invulnerability