Change the return type of coordinates() and fix a broken test.

Fix #235.