Layout manager bugfix (in progress)