Fix to make the custom error listeners work for extensions and applications