How many fish did you add at one time. Do you thank that adding 5 fish at one time to a 24 gallon system was wise. Even though you took some sand and rock from a previous system that does not necessarily mean that it will be able to sustain the bio load you placed on it. You should have set up the new tank and let the parameters stabilized before adding any fish. You need to add 1 fish at a time say over a course of 1 fish a week to let the system come to terms with the load. When your fish jumped into the filter and died it started to decompose right away and the result was an even higher strain on the system. Sorry if I come across as being stern that is not the intent of this, just want to help you understand what happened so you can avoid it in the future. Just remember only bad things happen fast in this hobby.

Rich