def wasnt the java ferns that killed the fish, is it a new fish to the tank? if so at the fish store that you got it from if their water perimeters are different from yours that might be the reason it died. sometimes lfs keep brackish fish in fresh water mostly because they dont know, you have to gradually add salt to the tank once you get the fish