Prevent default 404 handler after response sent

fixes #1023