Fixed on-error behaviour