added viewport use check