Fix flash in app layout