UI resize bug fix