fix bug with weeding out wrong coords