Do you have multiple <?php ... ?> blocks or newlines before <?php tag?
Following could cause this. If not, send me the page source to look at.
<?php
echo "download would not work because of newline char before php opening tag";
?>
<?php
// some code here, first block
?>
<?php
echo "download would not work because of new line between php blocks";
?>