Fix panic in build controller