You should have zero nitrite, it’s is extremely dangerous. Do another water change to get it down. And be sure to check that your tap water doesn’t have any.
I suspect your shrimp died from a mix of that, the melafix, and water change shock.
Stop using the melafix, it is an essential oil that...