adding check on low number of vertices fixes Mac OSX crash