Default Heimdall: Error cannot send data

Hey guys, I bricked the s4. I can boot into recovery and download mode but even if I install any rom through recovery I go into a bootloop. I'm using the rom switcher recovery. Please help me.
And when I try to use Heimdall it detects the device but then it gives the above error.
I'm on Mac 10.9.1
Sent from my HTC One using XDA Premium 4 mobile app