Minor bug fixes. Layouts bug fixed