Clean up errors when debug is on.