Fixed UI not updating after rotating screen.