Fixed layout issue when switching to no autoLayout