Was shadowing dir, changed var name.