fixed a bug occuring when shapes are entirely outside of the viewport