Fix compiling with custom layout