3D: Fixed error when resizing rendering container