fix viewport problem