Fix build status detection.