Fix issue with generate layout inside Engine