Big fixes for rtavis implementation