replaced invalid rtid with valid variable during the viewport setup