bugfix on dynamic layouts