backporting core_viewer from master