Fix:Corrected popd function if statement