Fix add_coords implementation