fixed postbuild and installed detection