Fix ui render bug