Fixed path error, modified ifs