fix for auto generate layout.