fix goal indexing errors