Bugfixes for autolayout