fix double headers send on 404