handle duplicated coordinates. Fixes #14.