fix issue with autolayout crash