Fix bug where semi-infinite shapes were rendered (poorly)