Don't send headers if already sent

Closes #15