Fixed a bug where view was missing in layouts.