Make build and attach callback work