aren't you doing this before the output buffer has been loaded? that doesn't happen until after the input gets sent