fix to work with and without autolayout