Bug fix: must change to the correct directory first.