Fix bug in updating page title in UI