Fix attachCallbacks