fixed detection of finished build process