fixed hooks to be set on the caller; added test for initializing id on non-default attr