fixed viewport and added corresponding changes