Fixed the size issue and made work with autolayout