Default SGH-I257M Soft Brick

I just recently got a S4 mini (SGH-I257M). I was trying to root it a few days ago (I think I accidentally used a file for the other models of the S4 mini) and after a reboot, my phone got stuck in a bootloop. I can boot into recovery but every time i select an option the screen flashes and goes back to the main recovery screen. I can boot perfectly into download mode though. I have tried flashing many stock ROMs but they all say FAIL on odin. Any help would be appreciated, thanks.