Introduce ViewerRef and fix on selection release