Handle the case where no layout has been set yet

It's a bit hacky in my pov, but I can't figure a more convenient way to handle that case.