Fixed bug with layout loader