fixed a bug in the isInstall function