Stop crashes when run outside a repo