Fixed issue with error handling on broken layers.