Fix protect error when handlers timeout with onPreResponse. Closes #1885