Fixed viewport problems and textures causing crash when initilizing