fix bug in computing targets + spelling typo