Fixes error nil-layout