Fixes to make the ERLE layer work